package org.bmp.zemail.login.common.services;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter
{
    @Override
    protected boolean requiresAuthentication(HttpServletRequest request, HttpServletResponse response)
    {
        if(request.getMethod().equals("POST")) {
        	System.out.println("POST");//TODO BM replace with logger
            return super.requiresAuthentication(request, response);
        } else {
        	System.out.println("GET");//TODO BM replace with logger
            return false;
        }
    }
}
